class Person {
    id;
    name;
    age;

    constructor(id, name, age) {
        this.id = id;
        this.name = name;
        this.age = age;

    }

    eat(count, food) {
        console.log('给我来%s碗%s', count, food);
    }

    say(content) {
        console.log('%s在说：%s', this.name, content)
    }

}


const zs = new Person('421xxxx003', '张三', 20);
zs.say('我们一块去吃饭吧！');
zs.eat(10, '小炒肉')


class Student extends Person {
    sid;
    school;
    major;

    constructor(id, name, age, sid, school, major) {
        super(id, name, age);
        this.sid = sid;
        this.school = school;
        this.major = major
    }

    doHomework(type) {
        console.log('%s在做%s作业', this.name, type);
    }
}


const dlj = new Student('421xxxx07', '邓兰君', 20, '10002777', '武汉', '计算机');

dlj.doHomework('高等数学')
dlj.eat(2, '兰州拉面')
